<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui" >
    <h:head>
        <title>Create Twitterer</title>
    </h:head>
    <h:body>
        <h:outputStylesheet name="default.css" />
        <h:form>
            <p:panel id="panel" header="Create Twitterer" style="margin-bottom:10px; width: 800px">  
                <p:messages id="messages" globalOnly="true" />  
                <h:panelGrid columns="3">  

                    <p:outputLabel for="username" value="Username: " />  
                    <p:inputText id="username" value="#{twittererBean.twitterer.userName}" 
                                 required="true" >  
                    </p:inputText>
                    <p:message for="username"/>
                    <p:outputLabel for="password" value="Password: " />  
                    <p:inputText id="password" value="#{twittererBean.twitterer.password}" 
                                 required="true"/>  
                    <p:message for="password"/>
                </h:panelGrid>  
            </p:panel>  

            <p:commandButton value="Create" update="panel" action="#{twittererBean.saveTwitterer()}"/>
            <p:commandButton value="Back" update="panel" action="#{twittererBean.toLogin()}" immediate="true"/>
        </h:form>
    </h:body> 
</html>  

